<c:if test="true"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxa="http://nuxeo.org/nxweb/actions"
  xmlns:nxl="http://nuxeo.org/nxforms/layout">

<c:if test="false">
Template displaying additional rendering for an action.

Parameters:
- action: the action instance (mandatory)
- mode: the action rendering mode (mandatory), for instance 'tab_content'
  or 'after_view'
- idPrefix: a String prefix to put before the action id (optional)
- actionType (optional): type to use if not set on action or needs to be
  used by default if not set on action

</c:if>

<nxu:set var="defActionWidgetName" value="#{idPrefix}#{nxu:jsfTagIdEscape(action.id)}_#{nxu:jsfTagIdEscape(mode)}">
<nxu:set var="simpleActionWidgetName" value="#{nxu:jsfTagIdEscape(action.id)}_#{nxu:jsfTagIdEscape(mode)}">

<c:choose>
  <c:when test="#{!removeActionOptims}">

    <nxa:action action="#{action}"
      value="#{fieldOrValue}"
      widgetName="#{nxu:test(formAdded, simpleActionWidgetName, defActionWidgetName)}"
      mode="#{mode}"
      addForm="#{addForm}"
      useAjaxForm="#{useAjaxForm}"
      hideIcon="#{hideIcon}"
      hideLabel="#{hideLabel}"
      useButton="#{useButton}"
      formAdded="#{formAdded}"
      disableFiltered="#{disableFiltered}"
      actionStyleClass="#{actionStyleClass}"
      clickedActionIdHolder="#{clickedActionIdHolder}"
      formStyleClass="#{formStyleClass}" />

  </c:when>
  <c:otherwise>

  <nxl:widgetType category="jsfAction"
    name="#{nxu:test(empty action.type, nxu:test(empty actionType, 'link', actionType), action.type)}"
    mode="#{mode}"
    widgetName="#{nxu:test(formAdded, simpleActionWidgetName, defActionWidgetName)}"
    hideIcon="#{hideIcon}"
    hideLabel="#{hideLabel}"
    useButton="#{useButton}"
    useAjaxForm="#{useAjaxForm}"
    ajaxReRender="#{ajaxReRender}"
    formAdded="#{formAdded}"
    actionStyleClass="#{actionStyleClass}"
    clickedActionIdHolder="#{clickedActionIdHolder}"
    value="#{fieldOrValue}" />

  </c:otherwise>
</c:choose>

</nxu:set>
</nxu:set>

</c:if>